package com.penghe.www.httplibrary

import android.util.Log

/**
 * Created by pengh on 2017/5/29.
 * 工具类
 */

internal object Tool {
    private var logFlag: Boolean = true
    private var TAG: String = "彭河"

    fun setLogStatus(logStatus: Boolean) {
        logFlag = logStatus
    }

    fun v(tag: String, message: String) {
        if (!logFlag){
            return
        }
        Log.v(tag,message)
    }

    fun v(message: String) {
        v(TAG,message)
    }

    fun d(tag: String, message: String) {
        if (!logFlag){
            return
        }
        Log.d(tag,message)
    }

    fun d(message: String) {
        d(TAG,message)
    }

    fun i(tag: String, message: String) {
        if (!logFlag){
            return
        }
        Log.i(tag,message)
    }

    fun i(message: String) {
        i(TAG,message)
    }

    fun w(tag: String, message: String) {
        if (!logFlag){
            return
        }
        Log.w(tag,message)
    }

    fun w(message: String) {
        w(TAG,message)
    }

    fun e(tag: String, message: String) {
        if (!logFlag){
            return
        }
        Log.e(tag,message)
    }

    fun e(message: String) {
        e(TAG,message)
    }
}